package com.ruoyi.system.service.impl;


import com.ruoyi.system.domain.OrderAllocationConfig;
import com.ruoyi.system.mapper.OrderAllocationConfigMapper;
import com.ruoyi.system.service.IOrderAllocationConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单分配配置Service业务层处理
 *
 * @author hjf
 * @date 2025-02-14
 */
@Service
public class OrderAllocationConfigServiceImpl implements IOrderAllocationConfigService {
    @Autowired
    private OrderAllocationConfigMapper orderAllocationConfigMapper;

    /**
     * 查询订单分配配置
     *
     * @param id 订单分配配置主键
     * @return 订单分配配置
     */
    @Override
    public OrderAllocationConfig selectOrderAllocationConfigById(Long id) {
        return orderAllocationConfigMapper.selectOrderAllocationConfigById(id);
    }

    /**
     * 查询订单分配配置列表
     *
     * @param orderAllocationConfig 订单分配配置
     * @return 订单分配配置
     */
    @Override
    public List<OrderAllocationConfig> selectOrderAllocationConfigList(OrderAllocationConfig orderAllocationConfig) {
        return orderAllocationConfigMapper.selectOrderAllocationConfigList(orderAllocationConfig);
    }

    /**
     * 新增订单分配配置
     *
     * @param orderAllocationConfig 订单分配配置
     * @return 结果
     */
    @Override
    public int insertOrderAllocationConfig(OrderAllocationConfig orderAllocationConfig) {
        return orderAllocationConfigMapper.insertOrderAllocationConfig(orderAllocationConfig);
    }

    /**
     * 修改订单分配配置
     *
     * @param orderAllocationConfig 订单分配配置
     * @return 结果
     */
    @Override
    public int updateOrderAllocationConfig(OrderAllocationConfig orderAllocationConfig) {
        return orderAllocationConfigMapper.updateOrderAllocationConfig(orderAllocationConfig);
    }

    /**
     * 批量删除订单分配配置
     *
     * @param ids 需要删除的订单分配配置主键
     * @return 结果
     */
    @Override
    public int deleteOrderAllocationConfigByIds(Long[] ids) {
        return orderAllocationConfigMapper.deleteOrderAllocationConfigByIds(ids);
    }

    /**
     * 删除订单分配配置信息
     *
     * @param id 订单分配配置主键
     * @return 结果
     */
    @Override
    public int deleteOrderAllocationConfigById(Long id) {
        return orderAllocationConfigMapper.deleteOrderAllocationConfigById(id);
    }
}
